package juice;

import juice.AOP$introduction.ServiceInterceptorModule;
import junit.Order;
import junit.OrderedRunner;
import junit.framework.TestCase;

import org.junit.Test;
import org.junit.runner.RunWith;

import com.google.inject.Guice;
import com.google.inject.Injector;

@RunWith(OrderedRunner.class)
public class TestAop extends TestCase
{
	@Test
	@Order(order = 1)
	public void testIntroduction()
	{
		Injector injector = Guice.createInjector(new ServiceInterceptorModule());

		injector.getInstance(ServiceInterceptorModule.class).service.sayHello();
		injector.getInstance(ServiceInterceptorModule.class).service.sayHello();
		injector.getInstance(ServiceInterceptorModule.class).service.sayHello();
	}
}
